#!/usr/bin/env python

import pygame
pygame.mixer.pre_init(22050, -16, 2, 1024)
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Summer Prisms")

screen.fill((255, 255, 255))
pygame.display.flip()
#time.sleep(0.15)

import modules.common
scene = modules.common.AbstractScene(screen, {})
tb = scene.create_textbox()

tb.set_location(invert_y=True, centre_x=True)
import time
for i in "Hello, world! This should actually be adding text with a fade effect, so it's somewhat wrong, but it's a decent demo all the same.".split():
    tb.queue_text(i)
    
while tb.tick(0.0):
    time.sleep(0.5)
    scene.render()
    pygame.display.flip()

"""
while True:
    time.sleep(0.01)
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            import sys
            sys.exit(0)
        elif event.type == pygame.KEYUP:
            if event.key == pygame.K_UP:
                pass
            elif event.key == pygame.K_DOWN:
                pass
            elif event.key == pygame.K_RETURN:
                pass
"""

